define(
	[	 	
	appBasePath + '/scripts/module.js',
	appBasePath + '/scripts/common/http.js',
	],
	function(substanceModule){
		substanceModule.factory('Demo.TodoService', [
		    '$q',
			'Demo.HttpService',			
		    function($q, httpService) {
	       	    return {
	       	    	create : function(data) {
						return httpService.post(appBasePath + '/todo/create', data);
					},
	       	    	save : function(data) {
						return httpService.post(appBasePath + '/todo/save', data);
					},
					remove: function(id) {
						return httpService.post(appBasePath + '/todo/remove', {id:id});
					},
					getMyTodoList : function() {
						return httpService.post(appBasePath + '/todo/getMyTodoList', {});
					},					
					getTodoItemById : function(id){
    					return httpService.post(appBasePath + '/todo/getTodoItemById', {id:id});
    				},
				};
			}
		]);
	}
);